home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97a.txt / 000051_icon-group-sender _Thu Feb 27 19:43:43 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Fri, 28 Feb 1997 08:56:53 MST
  2. To: icon-group@cs.arizona.edu
  3. Date: Thu, 27 Feb 1997 19:43:43 -0800
  4. From: Stuart Robinson <srobinso@reed.edu>
  5. Message-Id: <Pine.OSF.3.95.970227192847.26891A-100000@amon.reed.edu>
  6. Organization: Reed College,  Portland, Oregon
  7. Sender: icon-group-request@cs.arizona.edu
  8. Subject: Help with Program
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10. Status: RO
  11. Content-Length: 1053
  12.  
  13. Hello.  I am trying to do some text analysis with Icon.  Because I am new
  14. to the language (and to programming in general), I am not sure how to
  15. proceed.
  16.  
  17. Let me describe the problem and perhaps some generous soul will lend a
  18. hand.
  19.  
  20. I have a number of texts each line of which has been coded for three types
  21. of information.  Each line of the text will be assigned a number and a
  22. code for two categories. The numbers are just whole numbers (raning from 1
  23. to 20 or so) and each category has four members (say, ABCD and WXYZ). 
  24. Here is an example text: 
  25.  
  26. 1 A X
  27. 1 A Y
  28. 1 B Y
  29. 2 B Y
  30.  
  31. Note that some successive lines share an index number (as in lines 1 and
  32. 2 and 2 and 3).  When that is the case, I would like the program to
  33. output the members of each category for the matched lines, as below:
  34.  
  35. 1-2    AA    XY
  36. 2-3    AB    YY
  37.  
  38. That is it.  There are some additional complications, but I think that I
  39. can solve those at a later date.  At the moment, this sort of
  40. rough-and-ready analysis is all I need.
  41.  
  42. Any suggestions?  Thanks in advance.
  43.  
  44. --Stuart <srobinso@reed.edu>
  45.  
  46.